#include "Background.h"


Background::Background(const SDL_Surface *templateSurface, int startColor, int endColor)
{	
	bg = SDL_DisplayFormat((SDL_Surface*)templateSurface);
	g.generateBackgroundGradient(bg, startColor, endColor);
	
	imgObj = new ImageObject();
	imgObj->img = bg;
	imgObj->leftUpperCorner.x =0;
	imgObj->leftUpperCorner.y =0;
}

Background::~Background()
{
	SDL_FreeSurface(bg);
	delete imgObj;
}

ImageObject* Background::getImageObject()
{	 
	return imgObj;
}
